package com.spring.boot.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spring.boot.entity.PredictParam;
import com.spring.boot.mapper.PredictParamMapper;
import com.spring.boot.service.PredictionService;
import com.spring.boot.utils.Calculate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class PredictionServiceImpl extends ServiceImpl<PredictParamMapper,PredictParam> implements PredictionService {

    @Autowired
    private PredictParamMapper predictParamMapper;

    @Override
    public Map getPredictionData() {
//        predictParamMapper.selectOne();
//
//        Calculate calculate = new Calculate();
//        Map map = calculate.seri(100.0, 0.0, 1.0, 0.0, 7.0, 0.2, 5.0, 0.3, 0.7, 0.1, 101.0, 0, 100);
//        List<String> days = new ArrayList<>();
//        for (int i = 1; i < 40; i++) {
//            days.add("第" + i + "天");
//        }
//        map.put("day",days);
        HashMap<String, String> map = new HashMap<>();
        return map;
    }

    @Override
    public List<PredictParam> pagePredictionData() {
        //todo 待废弃
        return null;
    }
}
